package No0191_number_of_1_bits

import "fmt"

func hammingWeight(num uint32) int {

	var ans int = 0
	for i := 0; i < 32; i++ {
		if (num & (1 << i)) > 0 {
			ans++
		}
	}
	return ans
}

var Test func() = func() {
	var num uint32 = 11
	res := hammingWeight(num)
	fmt.Println(res)
}
